$(function () {
    obj.init();
});

var obj = new function () {
    'use strict';
    return {
        dataGrid: null,
        params: {
        },
        init: function () {
            this.dataGrid = new xhDataGrid($('#list'), 'user/getOnline');
            this.dataGrid.parseToolbar().init();

            this.listener();
        },
        listener: function () {
            var $this = this;
            // 绑定搜索事件
            xhTool.bindDocKeyDown($('#bt_list_search').click(function () {
                $this.funObj().search();
            }));
        },
        funObj: function () {
            var $this = this;
            return {
                search:function () {
                    $this.dataGrid.reload({
                        search:{
                            vague: xhExtra.getValue($('#list_vague'))
                        }
                    });
                }
            }
        }
    }
};